import React from "react";
// 当前这个组件才是真正的不知道redux存在的去情况
const Child = props => {
  // console.log(props);
  let value = "";
  const pushItem = () => {
    props.pushitem(value);
  };
  // 接收input值

  let handleChange = ({ target }) => {
    value = target.value;
    // console.log(targer.value);
  };
  return (
    <div>
      <input type="text" onChange={handleChange} />
      <button onClick={pushItem}>添加一条</button>
      {/* <button onClick={pushItem}>删除一条</button> */}
    </div>
  );
};

export default Child;
